package cn.jsony.system.service.impl;

import cn.jsony.basic.service.impl.BaseServiceImpl;
import cn.jsony.system.domain.SystemDictionaryType;
import cn.jsony.system.mapper.SystemDictionaryDetailMapper;
import cn.jsony.system.mapper.SystemDictionaryTypeMapper;
import cn.jsony.system.service.ISystemDictionaryTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class SystemDictionaryTypeServiceImpl extends BaseServiceImpl<SystemDictionaryType> implements ISystemDictionaryTypeService {
    @Autowired
    private SystemDictionaryTypeMapper type;


    @Autowired
    private SystemDictionaryDetailMapper detail;
    @Override
    @Transactional
    public void patchDel(List<Long> ids) {
        type.patchDel(ids);


    }

    @Transactional
    @Override
    public void del(Long id) {

        detail.removeBytypes_id(id);
        type.remove(id);

    }
}
